Design Pattern Refactoring by Pretty-Printing

نویسندگان

  • Jongwook Kim
  • Don Batory
  • Danny Dig
چکیده

Most design patterns in the Gang-of-Four text can be written as a refactoring script – a programmatic sequence of refactorings.R is a new Java refactoring engine based on prettyprinting. It builds a main-memory, non-persistent database to encode containment relationships among Java entity declarations (e.g., packages, classes, methods), language features such as inheritance and modifiers, and precondition checks for each declaration. R design pattern scripts modify the database and do not modify Abstract Syntax Trees (ASTs). While classical refactoring engines transform source code or ASTs directly, R produces refactored code by displaying the contents of the modified database when pretty-printing ASTs. R performs comparable precondition checks and code changes to that of the Eclipse Java Development Tools (JDT) refactorings but R’s codebase is about half the size of JDT refactorings and runs an order of magnitude faster. R refactorings pass relevant regression tests in JDT and fix JDT refactoring bugs that we found.

برای دانلود متن کامل این مقاله و بیش از 32 میلیون مقاله دیگر ابتدا ثبت نام کنید

ثبت نام

اگر عضو سایت هستید لطفا وارد حساب کاربری خود شوید

منابع مشابه

Pretty-Printing for Software Reengineering

Automatic software reengineerings change or repair existing software systems. They are usually tailor-made for a specific customer and language dependent. Maintaining similar reengineerings for multiple customers and different language dialects might therefore soon become problematic unless advanced language technology is being used. Generic pretty-printing is part of such technology and is the...

متن کامل

Software ENgineering Pretty-printing for software reengineering

CWI's research has a theme-oriented structure and is grouped into four clusters. Listed below are the names of the clusters and in parentheses their acronyms. 1. INTRODUCTION Software reengineering is concerned with changing and repairing existing software systems. Software reengi-neering is often language dependent and customer specific. For instance, Dutch banks have to standardize their bank...

متن کامل

Pretty-printing for Software Reengineering Sen Software Engineering

CWI's research has a theme-oriented structure and is grouped into four clusters. Listed below are the names of the clusters and in parentheses their acronyms. 1. INTRODUCTION Software reengineering is concerned with changing and repairing existing software systems. Software reengi-neering is often language dependent and customer specific. For instance, Dutch banks have to standardize their bank...

متن کامل

Infinite Pretty-printing in eXene

We describe the design and implementation of a Standard ML of New Jersey library for the interactive pretty-printing of possibly infinite syntax trees. The library handles elision in a novel way, and is implemented using Concurrent ML and the eXene X Window System toolkit. 1 Pretty-printing with Elision In the modern approach to pretty-printing, as developed by Oppen [Opp80] and others [Mik81, ...

متن کامل

Dependencies in Formal Mathematics: Applications and Extraction for Coq and Mizar

The Mizar language aims to capture mathematical vernacular by providing a rich language for mathematics. From the perspective of a user, the richness of the language is welcome because it makes writing texts more “natural”. But for the developer, the richness leads to syntactic complexity, such as dealing with overloading. Recently the Mizar team has been making a fresh approach to the problem ...

متن کامل

ذخیره در منابع من


  با ذخیره ی این منبع در منابع من، دسترسی به آن را برای استفاده های بعدی آسان تر کنید

برای دانلود متن کامل این مقاله و بیش از 32 میلیون مقاله دیگر ابتدا ثبت نام کنید

ثبت نام

اگر عضو سایت هستید لطفا وارد حساب کاربری خود شوید

عنوان ژورنال:

دوره   شماره 

صفحات  -

تاریخ انتشار 2015